package com.huahua.api.model;

import com.huahua.api.entity.pojo.ApiHolidayCountries;

import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author LoveHuahua
 * @date 2021年09月05日 20:10
 * @description believe in yourself
 */
public class LocalData {
    private static final ConcurrentHashMap<String,Integer> API_HOLIDAY_TYPE = new ConcurrentHashMap<>();
    private static final ConcurrentHashMap<String, ApiHolidayCountries> API_HOLIDAY_COUNTRIES = new ConcurrentHashMap<>();


    public static   void setApiHolidayType(String name,int type){
        API_HOLIDAY_TYPE.put(name,type);
    }

    public static   void setApiHolidayCountries(String name,ApiHolidayCountries data){
        API_HOLIDAY_COUNTRIES.put(name,data);
    }
    public static  ApiHolidayCountries getApiHolidayCountries(String name) {
        return API_HOLIDAY_COUNTRIES.get(name);
    }

    public static  Integer getApiHolidayType(String name) {
        return API_HOLIDAY_TYPE.get(name);
    }
}
